﻿<%@ Page Language="C#" MasterPageFile="~/SIPO.master" AutoEventWireup="false" CodeFile="Calculationform.aspx.cs"
    Inherits="SIPO.Web.Forms.Administration.Calculationform" %>

<asp:Content ID="ctnBody" ContentPlaceHolderID="body" runat="server">

    <script type="text/javascript">

        $(document).ready(function () {

            $("#btnSave").button({ icons: { primary: "ui-icon-disk"} });
            $("#btnDenda").button({ icons: { primary: "ui-icon-disk" } });
        });          

    </script>
    <script type="text/javascript">

        $(document).ready(function () {
            function showloading() {
                $('#siteLoader').show();
            }

            function hideloading() {
                $('#siteLoader').hide();
            }
            $("#btnSave").click(function () {
                showloading();
                var handlerUrl = '<%= ResolveUrl("~/ajaxhandler/transaction/recCalculationhandler.ashx") %>';
                $.ajax({
                    type: 'POST',
                    url: handlerUrl + "?method=insert",
                    contentType: 'application/json',
                    dataType: 'json',
                    data: '',
                    success: function (data) {
                        if (data.IsSuccess) {
                            alert(data.Message);
                        }
                        else {
                            alert(data.Message);
                        }
                        hideloading();
                    },
                    error: function (response) {
                        var r = JSON.parse(response.responseText);
                        alert("Error Message: " + r.Message);
                    }
                });
            });
            $("#btnDenda").click(function () {
                showloading();
                var handlerUrl = '<%= ResolveUrl("~/ajaxhandler/transaction/recDendahandler.ashx") %>';
                $.ajax({
                    type: 'POST',
                    url: handlerUrl + "?method=insert",
                    contentType: 'application/json',
                    dataType: 'json',
                    data: '',
                    success: function (data) {
                        if (data.IsSuccess) {
                            alert(data.Message);
                        }
                        else {
                            alert(data.Message);
                        }
                        hideloading();
                    },
                    error: function (response) {
                        var r = JSON.parse(response.responseText);
                        alert("Error Message: " + r.Message);
                    }
                });
             });
        });

    </script>
    <div>
        <table border="0">
            <tr>
                <td colspan="2" style="height: 40px">
                    &nbsp;
                </td>
                <td style="height: 40px">
                    <div style="text-align: left; padding-top: 10px;">
                        <button id="btnSave" type="button" style="width: 250px; text-align: left">
                            Iuran Berkala</button>
                    </div>
                </td>

            </tr>
             <tr>
                <td colspan="2" style="height: 40px">
                    &nbsp;
                </td>
                <td style="height: 40px">
                    <div style="text-align: left; padding-top: 10px;">
                        <button id="btnDenda" type="button" style="width: 250px; text-align: left">
                            Denda Keterlambatan Iuran Berkala </button>
                    </div>
                </td>

            </tr>
        </table>
        <table border="0">
            <tr>
                <td colspan="2" align="center">
                    <div id="siteLoader" style="display: none; text-align: center;">
                        <div id="siteDetailLoader">
                            <img src="../../images/loading_anchor.gif" border="0" alt="cargando" />
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <br />
    </div>
</asp:Content>
